<?php
class Model_Order {
	public $price;
	public $size;
	public $name;
	public $amount;
	public $sub_total;
	public $unit;
	public function __construct($prodId,$price,$amount){
		$this->price= $price;
		$this->amount = $amount;	
		$this->size = ($price == 30)?'ขนาดธรรมดา 30 บาท ':'ขนาดพิเศษ 40 บาท';
		$prod = Model_Product::getProductById($prodId);
		$this->name = $prod->getName();
		$this->unit  = $prod->getUnit();
		$this->sub_total = $this->price * $this->amount;
	}
}
?>